﻿using System;
using System.Runtime.InteropServices;

namespace KM_ClientPrintActiveX
{
    //   /// <summary>
    ///// IObjectSafety 的摘要说明。
    ///// </summary>
    //   [Guid("A6EC4896-BE40-48EF-B19B-2155831710FF"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    //   public interface IObjectSafety
    //   {
    //       // methods
    //       void GetInterfacceSafyOptions(
    //           System.Int32 riid,
    //           out System.Int32 pdwSupportedOptions,
    //           out System.Int32 pdwEnabledOptions);
    //       void SetInterfaceSafetyOptions(
    //           System.Int32 riid,
    //           System.Int32 dwOptionsSetMask,
    //           System.Int32 dwEnabledOptions);
    //   }

    [ComImport, GuidAttribute("CB5BDC81-93C1-11CF-8F20-00805F2CD064")]//固定不变的
    [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IObjectSafety
    {
        [PreserveSig]
        int GetInterfaceSafetyOptions(ref Guid riid, [MarshalAs(UnmanagedType.U4)] ref int pdwSupportedOptions, [MarshalAs(UnmanagedType.U4)] ref int pdwEnabledOptions);

        [PreserveSig()]
        int SetInterfaceSafetyOptions(ref Guid riid, [MarshalAs(UnmanagedType.U4)] int dwOptionSetMask, [MarshalAs(UnmanagedType.U4)] int dwEnabledOptions);
    }
}
